#include<stdio.h>
int main()
{
    char qw;
    scanf("%c",&qw);
    if(qw>='A'&&qw<='Z')
        qw=qw+32;
    else if(qw>='a'&&qw<='z')
        qw=qw-32;
    printf("%c",qw);
    return 0;

}

